{include file="common/header.tpl"}
<section class="main">
	<nav class="left-col">{include file="common/navi-system.tpl"}</nav>
    <article class="right-col">
    	<h2><a href="{$back}">Nội dung site tĩnh</a> &raquo; Cập nhật</h2>
        <form name="frmEdit" id="frmEdit" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}content/saveedit" class="ui">
            <input type="hidden" name="pcontentid" id="pcontentid" value="{$row.contentid}" />
            <input type="hidden" name="prefer" id="prefer" value="{if isset($smarty.session.post.prefer)}{$smarty.session.post.prefer}{else}{$prefer}{/if}" />
            <ul>
                {if isset($smarty.session.cerr)}
                    <li class="error">
                        <span class="error">{$smarty.session.cerr}</span>
                    </li>
                {/if}
                {if $AppUI->type == 3}                    
                    <li>
                        <label for="ppage">Page <span class="required">*</span>:</label>
                        <div class="txt">
                        	<input type="text" class="text" name="ppage" id="ppage" value="{if isset($smarty.session.post.ppage)}{$smarty.session.post.ppage|escape}{else}{$row.page|escape}{/if}" />
                        </div>
                    </li>
                    <li>
                        <label for="psection">Section:</label>
                        <div class="txt">
                        	<input type="text" class="text" name="psection" id="psection" value="{if isset($smarty.session.post.psection)}{$smarty.session.post.psection|escape}{else}{$row.section|escape}{/if}" />
                        </div>
                    </li>
                {else}
                    <input type="hidden" name="ppage" id="ppage" value="{$row.page|escape}" />
                    <input type="hidden" name="psection" id="psection" value="{$row.section|escape}" />
                    <input type="hidden" name="planguage" id="planguage" value="{$row.language|escape}" />
                {/if}
                <li>
                    <label for="pname">Trang<span class="required">*</span>:</label>
                    <div class="txt">
                    	<input type="text" class="text" name="pname" id="pname" value="{if isset($smarty.session.post.pname)}{$smarty.session.post.pname|escape}{else}{$row.name|escape}{/if}" />
                    </div>
                </li>
                <li>
                    <label for="pimage">Hình:</label>
                    <div class="txt">
                    	<input type="file" class="text" name="pimage" id="pimage" value="" />
                    </div>
                </li>
                {if $row.image != ""}
                    <li>
                        <label>Hình đã đăng:</label>
                        <div class="img">
                        	{image path=$row.image type="other" attr="style=\"max-width:640px;float:left;\""}
                        </div>
                    </li>
                {/if}
                <li>
                    <label for="pcontent">Nội dung<span class="required">*</span>:</label>
                    <div class="area">                       
                        <textarea rows="1" cols="1" name="pcontent" id="pcontent">{if $smarty.session.CONTENT_POST.pcontent}{$smarty.session.CONTENT_POST.pcontent}{else}{$row.content|str_striptags}{/if}</textarea>
                    </div>
                </li>
                <li>
                	<button type="submit"><strong>Lưu dữ liệu</strong></button>
                    <button type="button" onclick="javascript:document.location.href='{$back}'" class="cancel"><strong>Nhập lại</strong></button>
                </li>
        	</ul>
        </form>
   	</article>
</section>
{include file="common/footer.tpl"}
                
